<template>
  <el-empty :description="text" :imageSize="imageSize" v-if="props.type === 'image'" />
  <div class="empty-text" v-if="props.type === 'text'">{{ text }}</div>
</template>

<script setup>
import { onMounted, ref, reactive, watch, defineProps } from 'vue'

const props = defineProps({
  type: {
    type: String,
    default: 'image'
  },
  text: {
    type: String,
    default: '暂无数据'
  },
  imageSize: {
    type: Number,
    default: 80
  }
})
</script>

<style scoped lang="scss">
.el-empty {
  padding: 20px 0 !important;
}
.empty-text {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #909399;
  line-height: 60px;
  padding: 20px 0 !important;
  text-align: center;
  font-size: 20px;
}
</style>
